package io.dshubs.archives.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.dshubs.commons.mybatis.entity.BaseTenantEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;

/**
 * <p>
 * 库区表
 * </p>
 *
 * @author tan
 * @since 2021-08-16
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("archive_warehouse_zone")
public class ArchiveWarehouseZone extends BaseTenantEntity {

    private static final long serialVersionUID = 1L;


    @TableField("warehouse_id")
    @ApiModelProperty("库房id")
    @NotNull(message = "库房id不能为空")
    private Long warehouseId;

    @TableField("zone_code")
    @ApiModelProperty("库区编码")
    private String zoneCode;

    @TableField("archive_id")
    @ApiModelProperty("全宗对应id")
    @NotNull(message = "archiveId不能为空")
    private Long archiveId;

    @TableField("category_id")
    @ApiModelProperty("全宗门类对应id")
    @NotNull(message = "全宗门类对应id不能为空")
    private String categoryId;


    @TableField("zone_name")
    @ApiModelProperty("区域名称")
    private String zoneName;


    @TableField("zone_area")
    @ApiModelProperty("区域面积")
    private String zoneArea;


    @TableField("zone_type")
    @ApiModelProperty("库区类型")
    private String zoneType;


    @TableField("description")
    @ApiModelProperty("库区描述")
    private String description;


    @TableField("del_flag")
    @ApiModelProperty("删除标识  0：未删除 1：删除")
    private Integer delFlag;


    @ApiModelProperty("更新者")
    @TableField("updater")
    private Long updater;


    @TableField("update_date")
    @ApiModelProperty("更新时间")
    private Date updateDate;

    @ApiModelProperty(value = "货物id集合")
    @TableField(exist = false)
    private List<Long> archiveWarehouseLocationIds;


    @ApiModelProperty(value = "货物id集合")
    @TableField(exist = false)
    private List<ArchiveWarehouseLocation> archiveWarehouseLocationList;
}
